-
Notifications
You must be signed in to change notification settings - Fork 29
develop/413_switch_to_sqlalchemy_2 #630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
ArBridgeman
wants to merge
7
commits into
master
Choose a base branch
from
develop
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Add future=true to create_engine * Switch to sqlalchemy 2.x * Lower linting threshold to match change to sqlalchemy 2.0; we can address this separately * Due to migration, switch dbapi to new import_dbapi https://docs.sqlalchemy.org/en/20/core/internals.html#sqlalchemy.engine.default.DefaultDialect.import_dbapi * Config no longer present in sqlalchemy.testing.fixtures but sqlalchemy.testing * Remove future=true, as unneeded as on 2.x This will also be deprecated and removed https://docs.sqlalchemy.org/en/20/core/engines.html#sqlalchemy.create_engine.params.future * Remove implicit_returning as it's a legacy parameter that does nothing in 2.x https://docs.sqlalchemy.org/en/20/core/engines.html#sqlalchemy.create_engine.params.implicit_returning * Remove test_update_rowcount_return_defaults as no longer present in sqlalchemy.testing.suite.RowCountTest * Temporarily skip failing tests to investigate later * Add line about documentation for dialects * Simplify boolean logic * Simplify if with early return * Reinstate ArgSignatureTest which checks that all visit_XYZ() in :class:`_sql.Compiler` subclasses have **kw * Simplify early return https://github.com/sqlalchemy/sqlalchemy/blob/rel_2_0_43/lib/sqlalchemy/testing/suite/test_dialect.py#L51 * Update changelog and developer guide * Fix skip to be more specific; this only affects pyodbc usage & is a new test from 2.x * Simplify early return if statements
* Override visit_floordiv_binary in EXACompiler for Exasol * Floor division with python method was added in 2.x in sqlalchemy/sqlalchemy@6d589ff * A default method is provided to handle, but Exasol does not fully match this flag, so we override the affected method instead. * Fix to not in and use format string * Define ExaDecimal for pyodbc to resolve test * With updated Decimal transformation for pyodbc double-check skipped tests, which work now * Start debugging ComponentReflectionTest - Explicitly skip test groups - Fix define_reflected_tables * Clean up ExaDecimal
* Override single tests in ReturningGuardsTest which expect a certain exception from the calling service which is not true for websocket * Fix typos and harmonize spelling * Introduce _get_schema_replacement_string to consolidate schema definition * Extend has_table to search for views; required for 2.x consistency in tests https://docs.sqlalchemy.org/en/20/core/internals.html#sqlalchemy.engine.Dialect.has_table * Extend method to verify table/view exists and if not raises error and reactivate tests With the ability to find views via has_table(), the API also wants get_columns, get_pk_constraint, and get_foreign_keys to check if the table in question exists at all, so a check with has_table is used. * Modify tests as now unknown schema.table pairs should raise exception * Modify schema name to ensure UPPERCASE as input to Exasol DB tables is case sensitive * Switch NumericTest to xfail for clearer intention and to verify that our expectation holds as opposed to skipping it, which gives no information
* Drop support for turbodbc
* Remove pyodbc and odbc comments from documents * Remove pyodbc from code part 1 * Make comment general after removing pyodbc * Remove skip related to pyodbc; as tests should be ok to run now * Remove override due to pyodbc * Remove EXAODBC from connection string for websocket * Add to documentation per: Implicit autocommit was removed in SQLAlchemy 2.0. Use the .begin() method of Engine or Connection in order to use an explicit transaction for DML and DDL statements. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9) * Modify regression test to websocket, the remaining dialect variant * Drop support for pyodbc with changelog entry * With 2.0, we do not need the plugin * Add typing hint for colspec to resolve base.py mypy error * Remove older comment as not restricted anymore to pytest <6 * Remove odbc installation instructions for Ubuntu and ODBC usage * Switch to websocket, as last remaining dialect * Remove ODBC skip as no longer relevant; restore default test as override not needed; mark added test * With pyodbc removal, linting dropped to 4.9. Should create ticket to bring back up * Update slow tests to separately run sqla, exasol, & regression tests to make debugging easier in future * Fix test to reduced state with only websocket still * Without ODBC dialects, there is no longer a use_sql_fallback argument. Thus, test_compare_get_schema_names_for_sql_and_odbc is obsolete, as covered by test_get_schema_names * Without ODBC dialects, there is no longer a use_sql_fallback argument. Thus, test_compare_get_table_names_for_sql_and_odbc is obsolete, as covered by test_get_table_names * Without ODBC dialects, there is no longer a use_sql_fallback argument. Thus, test_has_table_table_exists and test_has_table_table_exists_not can be simplified and test_compare_has_table_for_sql_and_odbc can be removed. * Without ODBC dialects, there is no longer a use_sql_fallback argument. Thus, these tests can be simplified * Without ODBC dialects, there is no longer a use_sql_fallback argument. Thus, these tests can be removed for test_get_view_names and test_get_view_definition already cover * Without ODBC dialects, there is no longer a use_sql_fallback argument. Thus, these tests can be simplified. * Without ODBC dialects, there is no longer a use_sql_fallback argument. Thus, these tests can be dropped as covered by test_get_columns, test_get_foreign_keys, test_get_pk_constraint * Remove comment with ODBC mention * Reduce tests as sql_fallback does not exist now that ODBC-based dialects are gone * Switch from skip in requirements.py to xfail in the tests * Start collecting recurring issues in XfailRationale class - Switch to Xfail with strict=True so that changes in state are obvious, i.e. failed test suite - Stop overriding DifficultParametersTest as found all tests pass now * Collect more recurring issues in XfailRationale class - Switch from EXPLICIT_INDEX to MANUAL_INDEX - ExpandingBoundInTest.test_null_in_empty_set_is_false is not a valid test anymore; this highlights the importance of using super() and XFAIL * Finish moving skips to xfails * Re-add test with modifications as only 1 still fails for <= 7.1.30 * Turn off autocommit in the connection for rollback to work * Add change to README.rst per review comment * Add changes to test_suite.py per review comments * Add change to unreleased.md per review comment * Add change to developer_guide.rst per review comment * Add change to user_guide.rst per review comment * Move user_guide into its own directory as will expand in future and rename
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



closes #413
Checklist
Note: If any of the items in the checklist are not relevant to your PR, leave the box unchecked.
For any Pull Request
Is the following correct:
When Changes Were Made
Did you:
When Preparing a Release
Have you: